<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ page import="guestbook.Greeting" %>
<%@ page import="guestbook.Box" %>
<%@ page import="guestbook.PMF" %>
<%@ page import="guestbook.FDT_data" %>
<%@ page import="guestbook.PK_data" %>

  
  						<%
									PersistenceManager pm = PMF.get().getPersistenceManager();
									String query = "select from " + PK_data.class.getName();
									List<PK_data> pk_datas = (List<PK_data>) pm.newQuery(query).execute();
									if (pk_datas.isEmpty()) {
							%>

							<p>The PK_data is empty.</p>

							<%
									} else {
							%>
							
							{ "pk": [
							
							<%
											for (PK_data p : pk_datas) {
							%>
							
							{
							"name" 	: "<%= p.get_name() %>",
							"free" 	: "<%= p.get_free() %>",
							"total" : "<%= p.get_total() %>",
							"lat" 	: "<%= p.get_lat() %>",
							"lng" 	: "<%= p.get_lng() %>"
							} ,
							
							<%
											}
									}
									pm.close();
							%>
							{
							"name" 	: "",
							"free" 	: "",
							"total" : "",
							"lat" 	: "",
							"lng" 	: ""
							} 
							]}
